<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="备份前准备">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="goldendb-00007.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="">
<meta name="DC.Publisher" content="20250306">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="goldendb-00010">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>备份前准备</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="goldendb-00010"></a><a name="goldendb-00010"></a>

<h1 class="topictitle1">备份前准备</h1>
<div><p>备份前，请参考<a href="#goldendb-00010__zh-cn_topic_0000001507642537_table10744125193920">表1</a>提前准备相关信息。</p>

<div class="tablenoborder"><a name="goldendb-00010__zh-cn_topic_0000001507642537_table10744125193920"></a><a name="zh-cn_topic_0000001507642537_table10744125193920"></a><table cellpadding="4" cellspacing="0" summary="" id="goldendb-00010__zh-cn_topic_0000001507642537_table10744125193920" frame="border" border="1" rules="all"><caption><b>表1 </b>备份前准备</caption><colgroup><col style="width:27.51%"><col style="width:28.139999999999997%"><col style="width:44.36%"></colgroup><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="27.507249275072493%" id="mcps1.3.2.2.4.1.1"><p>准备项</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.13718628137186%" id="mcps1.3.2.2.4.1.2"><p>获取方式</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.35556444355564%" id="mcps1.3.2.2.4.1.3"><p>数据使用章节</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="27.507249275072493%" headers="mcps1.3.2.2.4.1.1 "><p>GoldenDB管理节点的用户名</p>
</td>
<td class="cellrowborder" valign="top" width="28.13718628137186%" headers="mcps1.3.2.2.4.1.2 "><p>请联系数据库管理员获取。</p>
</td>
<td class="cellrowborder" rowspan="2" valign="top" width="44.35556444355564%" headers="mcps1.3.2.2.4.1.3 "><p><a href="goldendb-00012.html">步骤1：注册GoldenDB集群</a></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.1 "><p>GoldenDB集群中管理节点的IP地址</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.2 "><p>请联系数据库管理员获取。</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>备份前，请参考<a href="#goldendb-00010__table209001815248">表2</a>提前准备相关信息。</p>

<div class="tablenoborder"><a name="goldendb-00010__table209001815248"></a><a name="table209001815248"></a><table cellpadding="4" cellspacing="0" summary="" id="goldendb-00010__table209001815248" frame="border" border="1" rules="all"><caption><b>表2 </b>GoldenDB Insight备份前准备</caption><colgroup><col style="width:28.18%"><col style="width:42.94%"><col style="width:28.87%"></colgroup><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="28.182818281828183%" id="mcps1.3.4.2.4.1.1"><p>准备项</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.94429442944294%" id="mcps1.3.4.2.4.1.2"><p>执行步骤</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.872887288728872%" id="mcps1.3.4.2.4.1.3"><p>数据使用章节</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="28.182818281828183%" headers="mcps1.3.4.2.4.1.1 "><p>获取集群实例级存储配置ini文件</p>
</td>
<td class="cellrowborder" valign="top" width="42.94429442944294%" headers="mcps1.3.4.2.4.1.2 "><ol><li id="goldendb-00010__li13811124651318">登录GoldenDB Insight运维平台。</li><li id="goldendb-00010__li12811446111318">在“资源管理 &gt; 存储配置”界面中，单击“新增”。</li><li>在“新增存储配置”的弹框中，输入“名称”，“存储方式”选择<span class="uicontrol">“LOCAL”</span>，单击“下载模板”，下载集群实例级存储配置ini文件。</li><li>在“租户管理 &gt; 实例 &gt; 备份恢复”界面中，单击“配置”，查看待备份实例已绑定的实例级存储配置（如果实例未绑定实例级存储配置请忽略<a href="#goldendb-00010__li1592433903410">步骤5</a>）。</li><li id="goldendb-00010__li1592433903410"><a name="goldendb-00010__li1592433903410"></a><a name="li1592433903410"></a>单击实例级存储配置，获取实例级存储配置中的backup_rootdir参数，修改集群实例级存储配置ini文件中的backup_rootdir参数，与获取实例级存储配置中的backup_rootdir参数保持一致，并保存。</li></ol>
</td>
<td class="cellrowborder" rowspan="6" valign="top" width="28.872887288728872%" headers="mcps1.3.4.2.4.1.3 "><p><a href="goldendb-00013.html">步骤2：创建GoldenDB实例</a></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.1 "><p>在GoldenDB Insight运维平台上新增存储配置</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.2 "><ol><li>登录GoldenDB Insight运维平台。</li><li>在“资源管理 &gt; 存储配置”界面中，单击“新增”。</li><li>在“新增存储配置”的弹框中，输入“名称”，“存储方式”选择“LOCAL”，单击“上传”，上传集群实例级存储配置ini文件，单击“确定”。</li></ol>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.1 "><p>在GoldenDB Insight运维平台上修改存储配置信息</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.2 "><ol><li>登录GoldenDB Insight运维平台。</li><li>在GoldenDB Insight管理台<span class="uicontrol">“租户管理 &gt; GoldenDB &gt; 实例 &gt; 备份恢复 ”</span>界面中，单击<span class="uicontrol">“配置”</span>。</li><li>在<span class="uicontrol">“存储配置信息”</span>栏右侧单击<span class="uicontrol">“编辑”</span>。</li><li>在<span class="uicontrol">“编辑”</span>界面，展开<span class="uicontrol">“实例级存储配置”</span>。</li><li><span class="uicontrol">“实例级存储配置”</span>项选择新增的存储配置，单击<span class="uicontrol">“确定”</span>。</li></ol>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.1 "><p>在GoldenDB Insight运维平台上新增BINLOG备份</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.2 "><ol><li>登录GoldenDB Insight运维平台。</li><li>在GoldenDB Insight管理台<span class="uicontrol">“租户管理 &gt; GoldenDB &gt; 实例 &gt; 备份恢复 ”</span>界面中，单击<span class="uicontrol">“BINLOG备份”</span>。</li><li>单击<span class="uicontrol">“新增”</span>，在<span class="uicontrol">“新增BINLOG备份”</span>界面中选择<span class="uicontrol">“备份策略”</span>，单击<span class="uicontrol">“确定”</span>。<div class="note"><span class="notetitle"> 说明： </span><div class="notebody"><ul><li>按分片备份：每一个分片备份一份。</li><li>按AZ备份：每一个机房备份一份。</li><li><span style="color:#252B3A;">BINLOG备份文件会占用</span>本地存储空间，<span style="color:#252B3A;">备份文件</span>的大小会根据备份策略中设置的频率决定。</li></ul>
</div></div>
</li></ol>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.1 "><p>（可选）修改<span style="color:#252B3A;">BINLOG备份文件</span>的保留时间</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.2 "><p><span style="color:#252B3A;">BINLOG备份文件</span>默认保留7天，可执行以下步骤修改保留时间：</p>
<ol><li>用PuTTY工具，以root用户登录数据节点的主机。</li><li>执行<strong>vim <em>数据节点用户的根目录</em>/etc/dbagent.ini</strong>，打开<strong>dbagent.ini</strong>文件。例如：<pre class="screen">vim /home/goldendb/zxdb1/etc/dbagent.ini</pre>
</li><li>配置保留时间。<pre class="screen">binlog_clean_file_timeout = <em>保留天数</em></pre>
<div class="note"><span class="notetitle"> 说明： </span><div class="notebody"><p>保留天数的范围是0-999天，为了保证按时间点恢复，需保证<span>OceanProtect</span>的备份频率比BINLOG备份策略更快。</p>
</div></div>
</li><li>按“Esc”，输入：wq!保存退出。</li><li>切到数据节点的用户，执行以下命令，重新加载<strong>dbagent.ini</strong>文件。<pre class="screen">dbtool -dbagent -lc</pre>
</li></ol>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.1 "><p>获取配置数据节点的主机和用户名</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.4.1.2 "><ol><li>登录GoldenDB Insight运维平台。</li><li>单击"租户管理 &gt; GoldenDB &gt; 实例 &gt; 数据节点 &gt; 分片"。</li><li>在<span class="uicontrol">“分片”</span>区域中单击对应的数据节点的主机。</li><li>在<span class="uicontrol">“属性”</span>界面中，获取配置数据节点的主机和用户名。<span class="uicontrol">“身份信息”</span>栏中<span class="uicontrol">“IP地址”</span>和<span class="uicontrol">“安装信息”</span>栏中的<span class="uicontrol">“实力用户”</span>分别对应配置数据节点的主机和用户名。</li></ol>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="goldendb-00007.html">备份</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>